import { mapMutations, mapState } from 'vuex';
import { queryManageAreaService } from '@api/supplier/returnVisteManage';
export default {
  computed: {
    ...mapState('supplier/manageArea', [ 'manageArea', ]),
  },
  created () {
    if (!this.manageArea || !this.manageArea.length) {
      this.getManageAreaData()
    }
  },
  methods: {
    ...mapMutations('supplier/manageArea', [ 'setManageArea', ]),
    async getManageAreaData () {
      const { result } = await queryManageAreaService()
      if (result && result.length) {
        this.setManageArea(result)
      }
    },
  }
}
